<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>注册页面</title>
</head>
<body>
    <h1>注册页面</h1>
    {% macro print_error(type) %}
        {% for message in get_flashed_messages(category_filter = (type)) %}
            <p class="error" style="color:red;display:inline;">{{message}}</p>
        {% endfor %}
    {% endmacro %}

    <form action="" method="post">

        <label>用户名：</label><br>
        <input type="text" name="username">{{ print_error('message') }}{{print_error('info')}}<br>
        <label>密码：</label><br>
        <input type="password" name="password">
        <label>确认密码：</label><br>
        <input type="password" name="password2">{{print_error('error')}}<br>
        <p><input type="submit" value="注册"></p>

    </form>
</body>
</html>